package com.sunnada.edu.system.sysuser.service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;

@Service
@Transactional
public interface SysUserService {
	/***
	 * explain 总数量
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return int
	 */
	public int getUserCots(HashMap<String, String> params);

	/**
	 * explain 查询功能
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return List<?>
	 */
	public List<?> findUsers(HashMap<String, String> params);

	/***
	 * explain 用户删除
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String
	 */
	public String userDelete(HashMap<String, String> params);

	/**
	 * explain 用户添加保存
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String
	 */
	public String userAdd(HashMap<String, String> params);

	/**
	 * explain 用户修改保存
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String
	 */
	public String userUpdate(HashMap<String, String> params);

	/**
	 * explain 获得用户信息
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return Map
	 */
	public Map getUserByRecId(HashMap<String, String> params);

	/**
	 * explain 用户绑定角色
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String
	 */
	public String roleUserAdd(HashMap<String, String> params);

	/**
	 * explain 取消绑定角色
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String
	 */
	public String roleUserDelete(HashMap<String, String> params);

	/**
	 * explain 获得用户所有角色
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return String[]
	 */
	public String[] getRoleIdsByUserId(HashMap<String, String> params);

	/**
	 * explain 获得用户所有信息
	 * 
	 * @author zjc 2015-5-12 update zjc 2015-5-12
	 * @param params
	 * @return String[]
	 */
	public Map getUser(HashMap<String, String> params);

	/**
	 * explain 修改用户登陆密码
	 * 
	 * @author zjc 2015-5-12 update zjc 2015-5-12
	 * @param params
	 * @return String[]
	 */
	public String userpasswordUpdate(HashMap<String, String> params);

	/**
	 * explain 密码重置保存
	 * 
	 * @author chs 2015-5-13 update chs 2015-5-13
	 * @param params
	 * @return String
	 */
	public String userPwdReset(HashMap<String, String> params);

	/**
	 * 启用
	 * 
	 * @param params
	 * @return
	 */
	public String userEnable(HashMap<String, String> params);

	/**
	 * 禁用
	 * 
	 * @param params
	 * @return
	 */
	public String userDisable(HashMap<String, String> params);

	/**
	 * explain 注销
	 * 
	 * @author zjc 2015-6-25 update zjc 2015-6-25
	 * @param params
	 * @return String
	 */
	public String userLogout(HashMap<String, String> params);

	/**
	 * explain 获得用户可以授权的角色
	 * 
	 * @author zjc 2015-8-5 update zjc 2015-8-5
	 * @param params
	 * @return String[]
	 */
	public String[] getAuthorizeRoleIdsByUserId(HashMap<String, String> params);

	/**
	 * explain 授权功能
	 * 
	 * @author zjc 2015-8-5 update zjc 2015-8-5
	 * @param params
	 * @return String
	 */
	public String userRoleAuthorizeUpdate(HashMap<String, String> params);

	/**
	 * explain 获取选择的用户不包含在登录用户授权功能
	 * 
	 * @author zjc 2015-10-12 update zjc 2015-10-12
	 * @param params
	 * @return String
	 */
	public String[] getNotAuthorizeRoleIdsByUserId(HashMap<String, String> params);

	/**
	 * explain 授权功能中的角色绑定
	 * 
	 * @author zjc 2015-9-30 update zjc 2015-9-30
	 * @param params
	 * @return String
	 */
	public String userRoleBind(HashMap<String, String> params);

	/**
	 * explain 获取选择的用户不包含在登录用户的角色
	 * 
	 * @author zjc 2015-9-30 update zjc 2015-9-30
	 * @param params
	 * @return String
	 */
	public String[] getNoExitRoleIds(HashMap<String, String> params);

	/**
	 * explain 获取用户的选择的开户工号组
	 * 
	 * @author zjc 2016-5-16 update zjc 2016-5-16
	 * @param params
	 * @return List<?>
	 */

	/**
	 * 重置用户密码
	 * 
	 * @param params
	 * @return
	 */
	public String resetPwd(HashMap<String, String> params);

	/**
	 * 获取当前用户拥有的角色
	 * 
	 * @param params
	 * @return
	 */
	public List<HashMap<String, String>> getMyRoleList(HashMap<String, String> params);

	/**
	 * 给单个用户授权
	 * 
	 * @param params
	 * @return
	 */
	public String grentRoleToUser(HashMap<String, String> params);

	/**
	 * 所选用户有什么权限
	 * 
	 * @param params
	 * @return
	 */
	public List<HashMap<String, String>> getSelectUserRole(HashMap<String, String> params);

	/**
	 * 启用
	 * 
	 * @param params
	 * @return
	 */
	public String userEnables(HashMap<String, String> params);

	/**
	 * 禁用
	 * 
	 * @param params
	 * @return
	 */
	public String userDisables(HashMap<String, String> params);

	/**
	 * 按条件导出系统用户
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return List<?>
	 * @throws Exception
	 */
	public void exportSysUser(HashMap<String, String> params, HttpServletRequest request, HttpServletResponse response) throws Exception;

	/**
	 * 导出错误的
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return List<?>
	 * @throws Exception
	 */
	public void sysUserImport(MultipartFile file, HashMap<String, String> params, HttpServletRequest request, HttpServletResponse response)
			throws Exception;
	
	/**
	 * 导出模板的
	 * 
	 * @author chs 2015-5-12 update chs 2015-5-12
	 * @param params
	 * @return List<?>
	 * @throws Exception
	 */
	void sysUserModelExport(HashMap<String, String> params, HttpServletRequest request, HttpServletResponse response) throws Exception;

	public List<?> getRolePower(HashMap<String, String> params);
}
